<?php
if(have_posts())
{
	while (have_posts())
	{
		the_post();
		$post_id = get_the_ID();
		$title = get_the_title($post_id);
		$perlink = get_permalink($post_id);
		$alt = db_get_alt_attachment_id($post_id, $wpdb->prefix.'thumbnail');
		if(!$alt)
			$alt = db_vietnamese_slug($title);
		$thumbnail = db_get_post_meta($post_id, $wpdb->prefix.'thumbnail');
		
		?>
		
					<div class="box_sp2">
							<a href="<?php echo $perlink;?>" title="<?php echo $title;?>">								
								<?php echo db_get_thumbnail($thumbnail,$alt,168,86);?>
							</a>
							<p><a href="<?php echo $perlink;?>" title="<?php echo $title;?>"><?php echo db_shortDesc($title, 50);?></a></p>
						</div>
		<?php 	
	}
}
?>